<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5">
{
  style: {
    navigationBarTitleText: '入库核销',
    custom: true,
  },
}
</route>
<template>
  <Loyout class="outorder-page" bgc="#F3F8FE">
    <view class="busniss-box plr-30 flex-row flex-warp flex1 pt-40">
      <view
        v-for="item in pages"
        :key="item.name"
        @click="toPage(item)"
        class="busniss-item w-285 p-30 h-250 flex-center flex-column"
      >
        <image :src="Logo" class="w-90 h-90" alt="" />
        <text class="mt-10">{{ item.name }}</text>
      </view>
    </view>
  </Loyout>
</template>

<script lang="ts" setup>
import Loyout from '@/layouts/index.vue'
import Logo from '@/static/app/icons/180x180.png'
// 测试 uni API 自动引入
onLoad(() => {
  console.log('Home onLoad')
})

onShow(() => {
  console.log('Home Show')
})
const pages = [
  {
    path: '/pages/outorder/index',
    name: '采购入库',
  },
  {
    path: '/pages/demo/index',
    name: '退货入库',
  },
  {
    path: '/pages/download/index',
    name: '调拨入库',
  },
  {
    path: '/pages/upload/index',

    name: '生成入库',
  },
  {
    path: '/pages/demo/index',

    name: '召回入库',
  },
]
const toPage = (item: any) => {
  uni.navigateTo({
    url: item.path,
  })
}
</script>
